package net.zf.config;

import net.zf.base.ZFChatClient;
import net.zf.base.ZFChatClientBuilder;
import net.zf.bean.MetaInfo;
import net.zf.bean.ModeInfo;
import org.springframework.ai.chat.client.ChatClient;
import org.springframework.ai.chat.client.advisor.MessageChatMemoryAdvisor;
import org.springframework.ai.chat.memory.ChatMemory;
import org.springframework.ai.chat.memory.MessageWindowChatMemory;
import org.springframework.ai.chat.model.ChatModel;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class AiConfig {

    @Bean
    public ChatClient chatClient(ChatModel chatModel){
        return new ZFChatClientBuilder(chatModel).build();
    }

    @Bean
    public ModeInfo modeInfo(){
        ModeInfo modeInfo = new ModeInfo();

        modeInfo.setId("11111");
        modeInfo.setKey("CY1011");

        MetaInfo metaInfo = new MetaInfo();
        metaInfo.setName("CK999");
        metaInfo.setScore("90");

        modeInfo.setMetaInfo(metaInfo);

        return modeInfo;
    }

}
